Efficient data encoding

ABSTRACT

Circuits, methods, and apparatus for efficiently implementing encoding and decoding between binary and multilevel data.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.16/459,402, filed Jul. 1, 2019, which is a nonprovisional of, and claimsthe benefit of, U.S. provisional patent application No. 62/692,295,filed Jun. 29, 2018, which are incorporated by reference.

BACKGROUND

Computers and computing devices, such as laptops, all-in-one computers,smartphones, tablets, and other devices, perform data operations usingbinary data. Binary data is made up of individual bits, which can haveone of two states, a 0 or a low, and a 1 or a high. These states canalso be referred to as the ON and OFF states.

These computers and computing devices can communicate with each otherover cables that can include a number of conductors. These conductorscan convey signals, power supplies, or other voltages between or amongthe devices. These conductors can include wires, coaxial cables,fiber-optic cables, or other types of conductors.

Binary data can be transmitted and received using these conductors.Other types of data having more than one state—multilevel data—can alsobe transmitted and received using these conductors. Transmittingmultilevel data as compared to binary data can increase data rates andmore efficiently utilize available bandwidth. But the change from binarydata to multilevel data requires an encoding circuit, while the changeback from multilevel data to binary data requires a decoding circuit.These circuits can be complex and difficult to implement. These complexcircuits can delay computing device deployment, that is, new producttime-to-market. They can also increase power dissipation and otherresource utilization.

Thus, what is needed are circuits, methods, and apparatus forefficiently implementing encoding and decoding between binary andmultilevel data.

SUMMARY

Accordingly, embodiments of the present invention can provide circuits,methods, and apparatus for efficiently implementing encoding anddecoding between binary and multilevel data.

An illustrative embodiment of the present invention can provide a methodof encoding data where a first number of bits are received and encodedinto a second number of symbols. The received bits can be organized intogroups of bits, where one of the groups of bits can be referred to asfirst branch bits and another group of bits can be referred to as secondbranch bits. One or more first branch bits can be read, and it can bedetermined if the first branch bits have a value in a set of one or morepossible values for the branch bits. If they do, the remaining bits canbe encoded in a series of symbols. For example, groups of bits can beencoded into symbols using a translation table (or other method.) Thefirst branch bits can also be encoded into a symbol, for example if thefirst branch bits include two or more bits. In these and otherembodiments of the present invention, the first branch bits might notneed to be encoded, for example where the first branch bits only includeone bit. If the first branch bits do not have a value in the set of oneor more possible values, then one or more second branch bits can beread. Given the value of the second branch bits, one or more symbols inthe second number of symbols can be assigned an address value, where theaddress value is a value that binary data can't be encoded into usingthe translation table. The remaining bits can then be encoded into theremaining symbols in the second number of symbols using translationtable.

Another illustrative embodiment of the present invention can provide amethod of decoding data where the second number of symbols are receivedand decoded into the first number of bits. The received second number ofsymbols can be examined to see if one or more symbols have been assignedthe address value. If they do, then depending on which symbols have theaddress value, the remaining symbols in the second number of symbols canbe decoded, resulting in the decoded first number of bits. If thereceived second number of symbols do not include the address value, thenthe symbols can be decoded and the first number of bits recovered.

In a specific embodiment, eleven bits can be encoded into a series of 7three-level or ternary symbols. For example, binary bits can be encodedinto symbols that can be pulse-amplitude modulated symbols or PAM3symbols. The first two of these bits can be used as the first branchbits. When the first branch bits have one of three possible values, forexample 00, 01, or 10, the first branch bits can be encoded as a firstsymbol. The three subsequent groups of three bits each can then beencoded into two symbols. The resulting 7 symbols can then betransmitted. If the first branch bits do not have one of three possiblevalues, for example, they have a value of 11, the first branch bitscan't be encoded in the first symbol, since the 00, 01, and 10 statesalready correspond to the three possible symbol states. Instead, thefirst group of three bits, which can be referred to as the second branchbits, are read. Based on the value of the second branch bits, a firstsymbol can be assigned a value and one of the three subsequent groups oftwo symbols can be assigned the address value. The first branch bits donot need to be encoded since their value (11) can be determined by adecoder from the presence of an address value. The remaining bits can beencoded into the remaining symbols.

In these and other embodiments of the present invention, groups of threebits can be encoded into two three-level symbols. Three bits can haveone of 8 values (8 different combinations), while two three-levelsymbols can have 9 possible values. This leaves a ninth state for thetwo symbols that is unused in the encoding of the three bits. Thisunused ninth state can then be used as an address value, where thepresence and position of the address value can be used in decoding aseries of symbols.

For example, in a specific embodiment of the present invention, 7three-level symbols can be decoded into eleven bits. Again, thesesymbols can be pulse-amplitude modulated symbols or PAM3 symbols. Agroup of seven symbols can be received. The symbols can be checked forthe presence of an address value. If an address value is found, a valuefor the two first branch bits can be determined to have a value of 11,consistent with the encoding scheme above. The first symbol can be readand from that, along with the location of the address bits, the secondbranch bits can be determined. The remaining bits can be determinedgiven the position of the address bits. More specifically, since thefirst branch bits and the second branch bits are known, the 6 bits inthe last two groups of three bits remain to be determined. The addressvalue can be located in a pair of the remaining 6 symbols, leaving twogroups of two symbols to be decoded. Each group of two symbols can thenbe decoded into three bits resulting in the last 6 bits, therebycompleting the decoded set of eleven bits. If an address value is notpresent in the 7 three-level symbols, the first symbol can be decodedinto the two first branch bits. The remaining three groups of two bitseach can be decoded into three groups of three bits, thereby completingthe eleven decoded bits.

Another illustrative embodiment of the present invention can provide amethod of encoding data where a first number of bits are received andencoded into a second number of symbols. One or more first branch bitscan be read, and it can be determined if the first branch bits have avalue in a first set of one or more possible values for the branch bits.If they do, the remaining bits can be encoded in a series of symbolsusing a translation table (or other method.) The first branch bits canalso be encoded into a symbol, for example if the first branch bitsinclude two or more bits. In these and other embodiments of the presentinvention, the first branch bits might not need to be encoded, forexample where the first branch bits only include one bit. If the firstbranch bits do not have a value in the first set of one or more possiblevalues, then one or more second branch bits can be read. It can then bedetermined if the second branch bits have a value in a second set ofvalues. If they do, then given the value of the second branch bits, oneor more symbols in the second number of symbols can be assigned anaddress value, where the address value is a value that binary data can'tbe encoded into using the translation table. If the second branch bitsdo not have a value in the second set of values, then one or more thirdbranch bits can be read. As before, it can then be determined if thethird branch bits have a value in a third set of values. If they do,then given the value of the third branch bits, two or more symbols inthe second number of symbols can be assigned an address value. This canbe repeated as necessary until the remaining bits can be encoded intothe remaining symbols in the second number of symbols.

Another illustrative embodiment of the present invention can provide amethod of decoding data where the second number of symbols are receivedand decoded into the first number of bits. The received second number ofsymbols can be examined to see if one or more symbols have been assignedthe address value. If they have, then depending on which symbols havethe address value, the remaining symbols in the second number of symbolscan be decoded, resulting in the decoded first number of bits. If thereceived second number of symbols do not include the address value, thenthe symbols can be decoded and the first number of bits recovered.

In a specific embodiment, 19 bits can be encoded into a series of 12three-level symbols. As before, these binary bits can be encoded intosymbols that can be pulse-amplitude modulated symbols or PAM3 symbols.The first of these bits can be used as the first branch bit. If thefirst branch bit has a specific value, for example 0, then the remaining18 bits can be arranged in 6 groups of three bits each and encoded intoa corresponding 6 pairs of two symbols for a total of 12 symbols. If thefirst branch bit does not have the specific value, for example it is a1, then a subsequent set of three bits can be used as second branchbits. If the second branch bits have a value in a second set of values,then one pair of symbols can be assigned the address value, where thelocation of the address value is dependent on the value of the secondbranch bits. The remaining 5 groups of three bits can be encoded intothe remaining 5 pairs of symbols. There is no need to encode the firstbranch bit or the second branch bits since their value can be determinedby a decoder from the presence of an address value. If the second branchbits do not have a value in the second set of values, then a subsequentset of three bits can be used as third branch bits. If the second branchbits have a first specific value, and the third branch bits have a valuein a third set of values, then two pairs of symbols can be assigned theaddress value, where the location of the address values are dependent onthe value of the second branch bits and the third branch bits. Theremaining 4 groups of three bits can be encoded into the remaining 4pairs of symbols. Again, there is no need to encode the first branch bitsince its value can be determined by a decoder from the presence of anaddress value. There is also no need to encode the second or thirdbranch bits since their value can be determined by a decoder from thepresence of two address values. If the second branch bits do not havethe first specific value and the third branch bits have a value in athird set of values, then two pairs of symbols can be assigned theaddress value, where the location of the address values are dependent onthe value of the second branch bits and the third branch bits. Theremaining 4 groups of three bits can be encoded into the remaining 4pairs of symbols. Again, there is no need to encode the first branch bitsince its value can be determined by a decoder from the presence of anaddress value. There is also no need to encode the second or thirdbranch bits since their value can be determined by a decoder from thepresence of two address values. If the third branch bits do not have avalue in the third set of values, then a subsequent set of three bitscan be used as fourth branch bits. Three pairs of symbols can beassigned the address value, where the location of the address values aredependent on the value of the second branch bits, the third branch bits,and the fourth branch bits. The remaining 3 groups of three bits can beencoded into the remaining 3 pairs of symbols. Again, there is no needto encode the first branch bit since its value can be determined by thepresence of an address value. There is also no need to encode thesecond, third, or fourth branch bits since their value can be determinedby a decoder from the presence of three address values.

In a specific embodiment, a series of 12 three-level symbols can bedecoded into 19 bits. In this example, the 12 symbols can be arranged in6 pairs. Three of those 6 pairs can have the address value in one of 8combinations. The 6 symbols pairs are checked to see if they have 3pairs with address values in one of those 8 combinations. If they do, afirst branch bit, second branch bits, third branch bits, and fourthbranch bits can be determined. The remaining bits can be decoded fromthe remaining symbols. If three symbol pair do not have the addressvalue, a check of whether two symbol pairs have the address value isdone. The 6 symbol pairs can have two with address values in one of 15combinations. If they do, a first branch bit, second branch bits, andthird branch bits can be determined. The remaining bits can be decodedfrom the remaining symbols. If two symbol pairs do not have the addressvalue, a check of whether one symbol pair has the address value is done.If it does, a first branch bit and second branch bits can be determined.The remaining bits can be decoded from the remaining symbols. If nosymbol pair have the address value, the first branch bit can be set andthe symbol pairs can be decoded directly. Again, each of these symboldecoding can be done using a translation table or other appropriatemethod.

These and other embodiments of the present invention can provideencoders and decoders that can be readily implemented using a minimalamount of logic gates. This can reduce component size, save power, speeddesign, and improve yields. While examples are shown utilizing specificnumbers of bits, symbols, and type of symbols, these and otherembodiments of the present invention can utilize different numbers ofbits, symbols, and different types of symbol, such as four or five levelsymbols. Other types of encoding (and decoding), such as phase orfrequency encoding, can also be used.

Embodiments of the present invention can provide data encoders anddecoders that can be used in various types of devices, such as lightingequipment, portable computing devices, tablet computers, desktopcomputers, laptops, all-in-one computers, wearable computing devices,cell phones, smart phones, media phones, storage devices, portable mediaplayers, navigation systems, monitors, power supplies, adapters, remotecontrol devices, chargers, and other devices. Encoded signals can betransmitted using interface circuits and connector receptacles that canprovide pathways for signals and power compliant with various standardssuch as one of the Universal Serial Bus (USB) standards including USBType-C, High-Definition Multimedia Interface® (HDMI), Digital VisualInterface (DVI), Ethernet, DisplayPort, Thunderbolt™, Lightning, JointTest Action Group (JTAG), test-access-port (TAP), Directed AutomatedRandom Testing (DART), universal asynchronous receiver/transmitters(UARTs), clock signals, power signals, and other types of standard,non-standard, and proprietary interfaces and combinations thereof thathave been developed, are being developed, or will be developed in thefuture.

Various embodiments of the present invention can incorporate one or moreof these and the other features described herein. A better understandingof the nature and advantages of the present invention can be gained byreference to the following detailed description and the accompanyingdrawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an electronic system that can be improved by theincorporation of an embodiment of the present invention;

FIG. 2 illustrates an electronic device according to an embodiment ofthe present invention;

FIGS. 3-5 illustrate a method of encoding data according to anembodiment of the present invention;

FIGS. 6-7 illustrate a method of decoding data according to anembodiment of the present invention;

FIGS. 8-16 illustrate another method of encoding data according to anembodiment of the present invention;

FIGS. 17-25 illustrate another method of decoding data according to anembodiment of the present invention;

FIGS. 26-27 illustrate another method of encoding data according to anembodiment of the present invention;

FIGS. 28-29 illustrate a method of decoding data according to anembodiment of the present invention;

FIGS. 30-31 illustrate a method of reducing baseline wander according toan embodiment of the present invention;

FIGS. 32-34 illustrate another method of encoding data according to anembodiment of the present invention; and

FIGS. 35-36 illustrate a method of decoding data according to anembodiment of the present invention.

DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS

FIG. 1 illustrates an electronic system that can be improved by theincorporation of an embodiment of the present invention. In thisexample, a first device 110 can be in communication with a second device120 over a cable 130. Specifically, connector insert 132 on cable 130can be inserted into connector receptacle 112 on first device 110, whilea second connector insert (not shown) can be inserted into a secondconnector receptacle (not shown) on second device 120. First device 110and second device 120 can communicate by sending data to each other overcable 130. One of the two devices can send power to the other over cable130 as well.

FIG. 2 illustrates an electronic device according to an embodiment ofthe present invention. This figure, as with the other included figures,is shown for illustrative purposes and does not limit either thepossible embodiments of the invention or the claims. Also, in theseexamples, specific values for binary and multilevel data are shown, andthese examples are shown for illustrative purposes and do not limiteither the possible embodiments of the invention or the claims. Also,the specific placement of address values and encoded data in theseexamples are shown for illustrative purposes and do not limit either thepossible embodiments of the invention or the claims.

This electronic device can include device circuitry 210. Devicecircuitry 210 can include one or more integrated circuits, modules, orother circuits or compliments. Device circuitry 210 can implement someor all of the functions of the electronic device. The electronic devicecan further include transceiver circuitry. This transceiver circuitrycan include error correction 220. Error correction 220 can receive datafrom device circuitry 210 and can implement error correction algorithmsand modify data to be transmitted accordingly. This circuitry can also,or instead, include other functions such as interleaving, run lengthlimiting, or other functions. Encoder 230 can receive groups of bits andencode them for transmission by transmitter 240. This encoder 230 canprovide an efficient way of encoding data for transmission that reducespower, saves space, reduces design cycle time, and provides otherbenefits. The encoded data transmitted by transmitter 240 can be amultilevel code, for example, it can be PAM3 data. Transmitter 240 cantransmit this data over data channel 250. Data channel 250 can includeconnectors and cable 130 as shown in FIG. 1 or other connectors andcables consistent with these and other embodiments of the presentinvention. In these and other embodiments of the present invention, thetransmission and reception of data can be wireless.

Symbol data can be received by receiver 260 via data channel 250.Receiver 260 can provide data to decoder 270. This decoder 270 canprovide an efficient way of decoding data for transmission that reducespower, saves space, reduces design cycle time, and provides otherbenefits. Decoder 270 can decode the symbols received from receiver 260and provide groups of bits to error correction 280. Error correction 280can implement error correction algorithms and modify the received dataaccordingly. The circuitry can also or instead include other functionssuch as de-interleaving, length limiting, or other functions. Errorcorrection 280 can provide data to device circuitry 210.

FIGS. 3-5 illustrate a method of encoding data according to anembodiment of the present invention. This illustrative embodiment canprovide a method of encoding data where a first number of bits arereceived and encoded into a second number of symbols for transmission.One or more first branch bits can be read, and it can be determined ifthe first branch bits have a value in a set of one or more possiblevalues for the branch bits. If they do, the remaining bits can beencoded in a series of symbols using a translation table (or othermethod.) The first branch bits can also be encoded into a symbol. If thefirst branch bits do not have a value in the set of one or more possiblevalues, then one or more second branch bits can be read. Given the valueof the second branch bits, one or more symbols in the second number ofsymbols can be assigned an address value, where the address value is avalue that binary data can't be encoded into using the translationtable. The remaining bits can then be encoded into the remaining symbolsin the second number of symbols using the translation table.

In this specific embodiment, eleven bits can be encoded into a series of7 three-level or ternary symbols. This coding can be selected for itsefficiency since eleven bits defines 2048 possibilities, while 7three-level symbols provides 2187 combinations into which the 2048possibilities can be mapped. For example, binary bits can be encodedinto symbols that can be pulse-amplitude modulated symbols or PAM3symbols. In FIG. 3, eleven bits can be received in act 310. In act 320,the bits can be arranged in branch bits, where a first branch BR1 isequal to the first two bits, b0 and b1, and where each subsequent branchis equal to the following three bits for four groups of branch bits. Ifthe first branch bits have one of three possible values in act 330, forexample 00, 01, or 10, those two bits can be encoded as a first symbolin act 340. The three subsequent groups of three bits each can then beencoded into two symbols in act 350. The resulting 7 symbols can then betransmitted.

In these and other embodiments of the present invention, groups of threebits can be encoded into two three-level symbols. Three bits can haveone of 8 values (8 different combinations), while two three-levelsymbols can have 9 possible values. This leaves a ninth state for thetwo symbols that is unused in the encoding of the three bits. Thisunused ninth state can then be used as an address value, where thepresence and position of the address value can be used in decoding aseries of symbols. In the translation table of FIG. 4, bits b2, b3, andb4 (for example) can be encoded into PAM3 or other three-level symbolsU1 and U2, where U1 and U2 can have a low value, a zero value, or a highvalue. FIG. 4 can also be used to decode symbols U1 and U2 back intobits b2, b3, and b4. This table can be used for encoding various groupsof three bits into two symbols, and back again, in the various examplesshown below and by other embodiments of the present invention. In theseand other embodiments of the present invention, other tables can beused. For example, a table having bits arranged in a gray-code order canbe used.

The unused ninth state, in this example a value of HH for U1 and U2, canbe used as the address value in the various examples shown below and byother embodiments of the present invention, though in other embodimentsof the present invention, other codes, such as LL or 00, can be used asthe address value. This address value can be used to efficiently conveyvalues of branch bits thereby simplifying encoding. These address valuescan also be used in a corresponding decoder to efficiently decodevarious branch bits, as shown below.

If the first branch bits from FIG. 3 do not have one of three possiblevalues, for example they have a value of 11, the first branch bits can'tbe encoded in the first symbol. Instead, the first group of three bitsb2, b3, and b4, which are referred to as the second branch bits BR2, areread and the encoding procedure continues at block A in FIG. 5.Depending on the value of the second branch bits BR2, the second branchbits BR2 are encoded as the first symbol U7 in acts 516, 526, and 536,and one of the three subsequent groups of two symbols can be assignedthe address value (HH) in acts 514, 524, and 534. The first branch bitsdo not need to be encoded since their value (11) can be determined by adecoder from the presence of an address value. The remaining bits can beencoded into the remaining symbols as shown in acts 518, 528, and 538.

FIGS. 6-7 illustrate a method of decoding data according to anembodiment of the present invention. In this example, the second numberof symbols are received and decoded into the first number of bits. Thereceived second number of symbols can be examined to see if one or moresymbols have been assigned the address value. If they have, thendepending on which symbols have the address value, along with the valueof the first symbol, the remaining symbols in the second number ofsymbols can be decoded, resulting in the decoded first number of bits.If the received second number of symbols do not include the addressvalue, then the symbols can be decoded and the first number of bitsrecovered.

In this specific embodiment of the present invention, 7 three-levelsymbols can be decoded into eleven bits. A group of seven symbols U1-U7can be received in act 610. In this example, U7 can be referred to as afirst symbol and U1U2, U3U4, and U5U6 can be referred to as symbolpairs. The symbol pairs can be checked for the presence of an addressvalue in acts 612, 622, and 632. If an address value is found, a valuefor the two first branch bits BR1 can be determined to have a value of11 in acts 614, 624, and 634, consistent with the encoding scheme above.The first symbol can be read and from that the second branch bits BR2can be determined in acts 616, 626, and 636. The remaining bits can bedetermined given the position of the address bits in acts 618, 628, and638. More specifically, since the first branch bits and the secondbranch bits are known, 6 other bits in the last two groups of threebits, remain to be determined. The address value can be located in apair of the remaining 6 symbols, leaving two groups of two symbols to bedecoded. Each group of two symbols can then be decoded into three bits,thereby completing the decoded set of eleven bits.

If an address value is not present in the 7 three-level symbols, thedecoding can proceed to block A in FIG. 7. The first symbol can bedecoded into the two first branch bits in act 712. The remaining threegroups of two bits each can be decoded into three groups of three bitsin act 714, thereby completing the eleven decoded bits.

FIGS. 8-16 illustrate another method of encoding data according to anembodiment of the present invention. In this embodiment, a first numberof bits are received and encoded into a second number of symbols. Afirst branch bit can be read, and it can be determined if the firstbranch bit has a specific value. If it does, the remaining bits can beencoded in a series of symbols using a translation table (or othermethod.) If the first branch bit does not have a value in the first setof one or more possible values, then one or more second branch bits canbe read. It can then be determined if the second branch bits have avalue in a second set of values. If they do, then given the value of thesecond branch bits, one or more symbols in the second number of symbolscan be assigned an address value, where the address value is a valuethat binary data can't be encoded into using the translation table. Ifthe second branch bits do not have a value in the second set of values,then one or more third branch bits can be read. As before, it can thenbe determined if the third branch bits have a value in a third set ofvalues. If they do, then given the value of the third branch bits, twoor more symbols in the second number of symbols can be assigned anaddress value. This can be repeated as necessary until the remainingbits can be encoded into the remaining symbols in the second number ofsymbols.

In a specific embodiment, 19 bits can be encoded into a series of 12three-level symbols. This coding can be selected for its efficiencysince 19 bits defines 524,288 possibilities, while 7 three-level symbolsprovides 531,441 combinations into which the 524,288 possibilities canbe mapped. As before, these binary bits can be encoded into symbols thatcan be pulse-amplitude modulated symbols or PAM3 symbols. In FIG. 8, 19bits can be received in act 810. The first of these bits, b0, can beused as the first branch bit BR1 and subsequent groups of three bits canbe referred to as subsequent branch bits in act 820. If the first branchbit BR1 has a specific value, for example 0 in act 830, then theremaining 18 bits can be arranged in 6 groups of three bits each andencoded into a corresponding 6 pairs of two symbols for a total of 12symbols in act 840. This encoding can be the same or similar to theencoding in FIG. 4 above.

If the first branch bit b0 does not have the specific value, for exampleit is a 1, then a subsequent set of three bits b1, b2, and b3, can beused as second branch bits and the encoding can continue in FIGS. 9-10.If the second branch bits BR2 have a value in a second set of values inacts 912, 922, 932, 1012, 1022, and 1032, then one pair of symbols canbe assigned the address value in acts 914, 924, 934, 1014, 1024, and1034, where the location of the address value is dependent on the valueof the second branch bits. The remaining 5 groups of three bits can beencoded into the remaining 5 pairs of symbols in acts 918, 928, 938,1018, 1028, and 1038. There is no need to encode the first branch bit orthe second branch bits since their value can be determined by a decoderfrom the presence of an address value.

If the second branch bits do not have a value in the second set ofvalues, then a subsequent set of three bits can be used as third branchbits BR3 and the encoding can continue in FIGS. 11-12. If the secondbranch bits have a first specific value in act 1112, and the thirdbranch bits have a value in a third set of values in acts 1114, 1124,1124, 1214, 1224, and 1234, then two pairs of symbols can be assignedthe address value in acts 1116, 1126, 1136, 1216, 1226, and 1236, wherethe location of the address values are dependent on the value of thesecond branch bits and the third branch bits. The remaining 4 groups ofthree bits can be encoded into the remaining 4 pairs of symbols in acts1118, 1128, 1138, 1148, 1218, 1228, 1238, and 1248. Again, there is noneed to encode the first branch bit since its value can be determined bya decoder from the presence of an address value. There is also no needto encode the second or third branch bits since their value can bedetermined by a decoder from the presence of two address values.

If the second branch has a does not have the first specific value in act1112, the encoding can continue in FIGS. 13-14. If the third branch bitshave a value in a third set of values in acts 1314, 1324, 1324, 1344,1414, 1424, and 1434, 1444, then two pairs of symbols can be assignedthe address value in acts 1316, 1326, 1336, 1346, 1416, 1426, 1436, and1448, where the location of the address values are dependent on thevalue of the second branch bits and the third branch bits. The remaining4 groups of three bits can be encoded into the remaining 4 pairs ofsymbols in acts 1318, 1328, 1338, 1348, 1418, 1428, 1438, and 1448.Again, there is no need to encode the first branch bit since its valuecan be determined by a decoder from the presence of an address value.There is also no need to encode the second or third branch bits sincetheir value can be determined by a decoder from the presence of twoaddress values.

If the third branch bits do not have a value in the third set of values,then a subsequent set of three bits can be used as fourth branch bits.Three pairs of symbols can be assigned the address value in acts 1516,1526, 1536, 1546, 1616, 1626, 1636, and 1646, where the location of theaddress values are dependent on the value of the second branch bits, thethird branch bits, and the fourth branch bits. The remaining 3 groups ofthree bits can be encoded into the remaining 3 pairs of symbols in acts1518, 1528, 1538, 1548, 1618, 1628, 1638, and 1648. Again, there is noneed to encode the first branch bit since its value can be determined bythe presence of an address value. There is also no need to encode thesecond, third, or fourth branch bits since their value can be determinedby a decoder from the presence of three address values.

FIGS. 17-25 illustrate another method of decoding data according to anembodiment of the present invention. In this embodiment, a second numberof symbols can be received and decoded into the first number of bits.The received second number of symbols can be examined to see if one ormore symbols have been assigned the address value. If they have, thendepending on which symbols have the address value, the remaining symbolsin the second number of symbols can be decoded, resulting in the decodedfirst number of bits. If the received second number of symbols do notinclude the address value, then the symbols can be decoded and the firstnumber of bits recovered.

In a specific embodiment, a series of 12 three-level symbols can bedecoded into 19 bits. In this example, the 12 symbols can be arranged in6 pairs in act 1710. Three of those 6 pairs can have the address valuein one of 8 combinations. The 6 symbols pairs are checked to see if theyhave 3 pairs with address values in one of those 8 combinations in act1712 in FIGS. 17-18. If they do, a first branch bit, second branch bits,third branch bits, and fourth branch bits can be determined in acts1716, 1726, 1736, 1746, 1816, 1826, 1836, and 1846. The remaining bitscan be decoded from the remaining symbols in acts 1718, 1728, 1738,1748, 1818, 1828, 1838, and 1848.

If three symbol pair do not have the address value, a check of whethertwo symbol pairs have the address value is done in act 1912 on FIGS.19-22. The 6 symbol pairs can have two with address values in one of 15combinations. If they do, a first branch bit, second branch bits, andthird branch bits can be determined in acts 1916, 1926, 1936, 1946,2016, 2026, 2036, 2046, 2116, 2126, 2136, 2146, 2216, 2226, and 2236.The remaining bits can be decoded from the remaining symbols insubsequent acts as shown.

If two symbol pairs do not have the address value, a check of whetherone symbol pair has the address value is done in act 2312 and on FIGS.23-24. If it does, a first branch bit and second branch bits can be setin act 2510. The remaining bits can be decoded from the remainingsymbols. If no symbol pair have the address value, the first branch bitcan be set in act 2510 and the symbol pairs can be decoded directly inact 2520 in FIG. 25. Again, each of these symbol decoding can be done asshown in FIG. 4, or in a different manner.

In these and other embodiments of the present invention, eleven bits canbe encoded into a series of 7 three-level symbols. This coding can beselected for its efficiency since eleven bits defines 2048possibilities, while 7 three-level symbols provides 2187 combinationsinto which the 2048 possibilities can be mapped. But this means that notall of the three-level states are used. This can lead to random data nothaving an average value of the middle state. The resulting baselinewander can reduce a usable signal amplitude and lead to errors.Accordingly, embodiments of the present invention can modify the aboveencryption schemes to reduce the resulting baseline wander. For example,in FIG. 5 above, the 8 possible states for BR2 can be encoded as one ofthree positions for the address value and the first symbol U7. U7 can beL for three states, 0 for three states, and H for two states. As aresult, the average value for U7 might not be 0. Accordingly, when BR2has a value of 100, U7 can be alternately set to H. The result can thenbe that U7 can be L for three states, 0 for two states, and H for threestates. As a result, the average value for U7 can be 0. Other methods ofreducing baseline wander are shown in the following figures.

FIGS. 26 and 27 illustrate a method of encoding data according to anembodiment of the present invention. This illustrative embodiment canprovide a method of encoding data where a first number of bits arereceived and encoded into a second number of symbols for transmission.One or more first branch bits can be read, and it can be determined ifthe first branch bits have a value in a set of one or more possiblevalues for the branch bits. If they do, the remaining bits can beencoded in a series of symbols using a translation table (or othermethod.) The first branch bits can also be encoded into a symbol. If thefirst branch bits do not have a value in the set of one or more possiblevalues, then one or more second branch bits can be read. Given the valueof the second branch bits, one or more symbols in the second number ofsymbols can be assigned an address value, where the address value is avalue that binary data can't be encoded into using the translationtable. The remaining bits can then be encoded into the remaining symbolsin the second number of symbols using the translation table.

In FIG. 26, eleven bits can be received in act 2610. In act 2620, thebits can be arranged in branch bits, where a first branch BR1 is equalto the first two bits, b0 and b1, and where each subsequent branch isequal to the following three bits for four groups of branch bits. If thefirst branch bits have one of three possible values in act 2630, forexample 00, 01, or 10, those two bits can be encoded as a first symbolin act 2640. The three subsequent groups of three bits each can then beencoded into two symbols in act 2650. The resulting 7 symbols can thenbe transmitted.

If the first branch bits from FIG. 26 do not have one of three possiblevalues, for example they have a value of 11, the first branch bits can'tbe encoded in the first symbol. Instead, the first group of three bitsb2, b3, and b4, which are referred to as the second branch bits BR2, areread and the encoding procedure continues at block A in FIG. 27.Depending on the value of the second branch bits BR2, the second branchbits BR2 are encoded as the first symbol U7 in acts 2716, 2726, and2736, and one of the three subsequent groups of two symbols can beassigned the address value (HH) in acts 2714, 2724, and 2734. The firstbranch bits do not need to be encoded since their value (11) can bedetermined by a decoder from the presence of an address value. Theremaining bits can be encoded into the remaining symbols as shown inacts 2718, 2728, and 2738.

FIGS. 28-29 illustrate a method of decoding data according to anembodiment of the present invention. In this example, the second numberof symbols are received and decoded into the first number of bits. Thereceived second number of symbols can be examined to see if one or moresymbols have been assigned the address value. If they have, thendepending on which symbols have the address value, along with the valueof the first symbol, the remaining symbols in the second number ofsymbols can be decoded, resulting in the decoded first number of bits.If the received second number of symbols do not include the addressvalue, then the symbols can be decoded and the first number of bitsrecovered.

In this specific embodiment of the present invention, 7 three-levelsymbols can be decoded into eleven bits. A group of seven symbols U1-U7can be received in act 2810. In this example, U7 can be referred to as afirst symbol and U1U2, U3U4, and U5U6 can be referred to as symbolpairs. The symbol pairs can be checked for the presence of an addressvalue in acts 2812, 2822, and 2832. If an address value is found, avalue for the two first branch bits BR1 can be determined to have avalue of 11 in acts 2814, 2824, and 2834, consistent with the encodingscheme above. The first symbol can be read and from that the secondbranch bits BR2 can be determined in acts 2816, 2826, and 2836. Theremaining bits can be determined given the position of the address bitsin acts 2818, 2828, and 2838. More specifically, since the first branchbits and the second branch bits are known, 6 other bits in the last twogroups of three bits, remain to be determined. The address value can belocated in a pair of the remaining 6 symbols, leaving two groups of twosymbols to be decoded. Each group of two symbols can then be decodedinto three bits, thereby completing the decoded set of eleven bits.

If an address value is not present in the 7 three-level symbols, thedecoding can proceed to block A in FIG. 29. The first symbol can bedecoded into the two first branch bits in act 2912. The remaining threegroups of two bits each can be decoded into three groups of three bitsin act 2914, thereby completing the eleven decoded bits.

These and other embodiments of the present invention can provide furthertechniques for reducing baseline wander. For example, the translationtable of FIG. 4 can be further modified to include an offset. An exampleis shown in the following figure.

FIG. 30 illustrates offset that can be used in embodiments of thepresent invention. For each three-bit group 3000 can be translated to anoffset value 3010. In this example, eight different offset values areshown. In FIG. 31, the offset values can be used to encode data bits inact 3140.

In these and other embodiments of the present invention can vary theabove examples to further reduce baseline wander. An example is shown inthe following figures.

FIGS. 32-34 illustrate another method of encoding data according to anembodiment of the present invention. This illustrative embodiment canprovide a method of encoding data where a first number of bits arereceived and encoded into a second number of symbols for transmission.One or more first branch bits can be read, and it can be determined ifthe first branch bits have a value in a set of one or more possiblevalues for the branch bits. If they do, the remaining bits can beencoded in a series of symbols using a translation table (or othermethod.) The first branch bits can also be encoded into a symbol. If thefirst branch bits do not have a value in the set of one or more possiblevalues, then one or more second branch bits can be read. Given the valueof the second branch bits, one or more symbols in the second number ofsymbols can be assigned an address value, where the address value is avalue that binary data can't be encoded into using the translationtable. The remaining bits can then be encoded into the remaining symbolsin the second number of symbols using the translation table.

In FIG. 32, eleven bits can be received in act 3210. In act 3220, thebits can be arranged in branch bits, where a first branch BR1 is equalto the first two bits, b0 and b1, and where each subsequent branch isequal to the following three bits for four groups of branch bits. If thefirst branch bits have one of three possible values in act 3230, forexample 00, 01, or 10, those two bits can be encoded as a first symbolin act 3240. The three subsequent groups of three bits each can then beencoded into two symbols in act 3250. The resulting 7 symbols can thenbe transmitted.

As before, groups of three bits can be encoded into two three-levelsymbols. Three bits can have one of 8 values (8 different combinations),while two three-level symbols can have 9 possible values. This leaves aninth state for the two symbols that is unused in the encoding of thethree bits. This unused ninth state can then be used as an addressvalue, where the presence and position of the address value can be usedin decoding a series of symbols. In the translation table of FIG. 33,bits b2, b3, and b4 (for example) can be encoded into PAM3 or otherthree-level symbols U1 and U2, where U1 and U2 can have a low value, azero value, or a high value. The translation table of FIG. 33 can alsobe used to decode symbols U1 and U2 back into bits b2, b3, and b4. Thistable can be used for encoding various groups of three bits into twosymbols, and back again, in the various examples shown below and byother embodiments of the present invention. In these and otherembodiments of the present invention, other tables can be used. Forexample, a table having bits arranged in a gray-code order can be used.

The unused ninth state, in this example a value of 00 for U1 and U2, canbe used as the address value in the various examples shown below and byother embodiments of the present invention, though in other embodimentsof the present invention, other codes, such as LL or HH, can be used asthe address value. This address value can be used to efficiently conveyvalues of branch bits thereby simplifying encoding. These address valuescan also be used in a corresponding decoder to efficiently decodevarious branch bits, as shown below.

If the first branch bits from FIG. 32 do not have one of three possiblevalues, for example they have a value of 11, the first branch bits can'tbe encoded in the first symbol. Instead, the first group of three bitsb2, b3, and b4, which are referred to as the second branch bits BR2, areread and the encoding procedure continues at block A in FIG. 34.Depending on the value of the second branch bits BR2, the second branchbits BR2 are encoded as the first symbol U7 in acts 3416, 3426, and3436, and one of the three subsequent groups of two symbols can beassigned the address value (HH) in acts 3414, 3424, and 3434. The firstbranch bits do not need to be encoded since their value (11) can bedetermined by a decoder from the presence of an address value. Theremaining bits can be encoded into the remaining symbols as shown inacts 3418, 3428, and 3438.

FIGS. 35-36 illustrate a method of decoding data according to anembodiment of the present invention. In this example, the second numberof symbols are received and decoded into the first number of bits. Thereceived second number of symbols can be examined to see if one or moresymbols have been assigned the address value. If they have, thendepending on which symbols have the address value, along with the valueof the first symbol, the remaining symbols in the second number ofsymbols can be decoded, resulting in the decoded first number of bits.If the received second number of symbols do not include the addressvalue, then the symbols can be decoded and the first number of bitsrecovered.

In this specific embodiment of the present invention, 7 three-levelsymbols can be decoded into eleven bits. A group of seven symbols U1-U7can be received in act 3510. In this example, U7 can be referred to as afirst symbol and U1U2, U3U4, and U5U6 can be referred to as symbolpairs. The symbol pairs can be checked for the presence of an addressvalue in acts 3512, 3522, and 3532. If an address value is found, avalue for the two first branch bits BR1 can be determined to have avalue of 11 in acts 3514, 3524, and 3534, consistent with the encodingscheme above. The first symbol can be read and from that the secondbranch bits BR2 can be determined in acts 3516, 3526, and 3536. Theremaining bits can be determined given the position of the address bitsin acts 3518, 3528, and 3538. More specifically, since the first branchbits and the second branch bits are known, 6 other bits in the last twogroups of three bits, remain to be determined. The address value can belocated in a pair of the remaining 6 symbols, leaving two groups of twosymbols to be decoded. Each group of two symbols can then be decodedinto three bits, thereby completing the decoded set of eleven bits.

If an address value is not present in the 7 three-level symbols, thedecoding can proceed to block A in FIG. 36. The first symbol can bedecoded into the two first branch bits in act 3612. The remaining threegroups of two bits each can be decoded into three groups of three bitsin act 3614, thereby completing the eleven decoded bits.

These and other embodiments of the present invention can utilize atranslation table or similar technique, such as the translation table asshown in FIG. 33. In this example, three bits can be translated to oneof eight two-symbol combinations. The remaining unused ninth state canbe used as an address value, in this case 00. As shown in this example,when the bridge bits have a value of 11, one of the three pairs ofsymbols are assigned the address value 00, and since only one symbolpair can be assigned the address value 00 and none of the variousthree-bit combinations can be assigned the value of 00, there must be atransition edge within every 7 three-level symbols. Ensuring atransition edge every 7 symbols when the bridge bits are 11 can be usedto ensure regular edges to provide a run-length limited encoding scheme.For example, eleven-bit words having bridge bits with a value of 11 canbe inserted in a data stream to ensure the occurrence of transitionedges. Other techniques, such as the use of an offset as described abovecan also be used or included in such an encoding scheme.

These and other embodiments of the present invention can provideencoders and decoders that can be readily implemented using a minimalamount of logic gates. This can reduce component size, save power, speeddesign, and improve yields. While examples are shown utilizing specificnumbers of bits, symbols, and type of symbols, these and otherembodiments of the present invention can utilize different numbers ofbits, symbols, and different types of symbol, such as four or five levelsymbols. Other types of encoding (and decoding), such as phase orfrequency encoding, can also be used.

Embodiments of the present invention can provide data encoders anddecoders that can be used in various types of devices, such as lighting,portable computing devices, tablet computers, desktop computers,laptops, all-in-one computers, wearable computing devices, cell phones,smart phones, media phones, storage devices, portable media players,navigation systems, monitors, power supplies, adapters, remote controldevices, chargers, and other devices. Encoded signals can be transmittedusing interface circuits and connector receptacles that can providepathways for signals and power compliant with various standards such asone of the Universal Serial Bus standards including USB Type-C,High-Definition Multimedia Interface, Digital Visual Interface,Ethernet, DisplayPort, Thunderbolt, Lightning, Joint Test Action Grouptest-access-port, Directed Automated Random Testing, universalasynchronous receiver/transmitters, clock signals, power signals, andother types of standard, non-standard, and proprietary interfaces andcombinations thereof that have been developed, are being developed, orwill be developed in the future.

The above description of embodiments of the invention has been presentedfor the purposes of illustration and description. It is not intended tobe exhaustive or to limit the invention to the precise form described,and many modifications and variations are possible in light of theteaching above. The embodiments were chosen and described in order tobest explain the principles of the invention and its practicalapplications to thereby enable others skilled in the art to best utilizethe invention in various embodiments and with various modifications asare suited to the particular use contemplated. Thus, it will beappreciated that the invention is intended to cover all modificationsand equivalents within the scope of the following claims.

What is claimed is:
 1. A method of encoding a plurality of bits into aplurality of symbols, the method comprising: receiving the plurality ofbits comprising a first set of bits and a number of second sets of bits,the first set of bits having a first value and a second set of bits inthe number of second sets of bits having a second value; if the firstvalue is one of a first set of one or more values, then encoding thefirst set of bits into a first set of symbols, wherein the plurality ofsymbols comprises the first set of symbols and a number of second setsof symbols, and if the first value is not one of the first set of one ormore values, then based on the second value, assigning a second set ofsymbols in the number of second sets of symbols to have an addressvalue.
 2. The method of claim 1 wherein the second set of symbols in thenumber of second sets of symbols defines a first number of states and asecond state, where the second state is used as the address value. 3.The method of claim 2 further comprising: if the first value is one ofthe first set of one or more values, then encoding the number of secondsets of bits as a corresponding number of second sets of symbols.
 4. Themethod of claim 3 further comprising: if the first value is not one ofthe first set of one or more values; then using an identity of thesecond set of symbols having the address value to encode the firstsecond set of bits as the first set of symbols.
 5. The method of claim 4further comprising: if the first value is not one of the first set ofone or more values; then encoding each set of bits other than the firstset of bits and the second set of bits in the number of second sets ofbits as a corresponding set of symbols in the number of second sets ofsymbols not having the address value.
 6. The method of claim 5 whereinthe first set of bits is two bits, the second set of bits is three bits,the first set of symbols is one symbol, each second set of symbols istwo symbols, the first number of states is eight states, and the secondstate is one state.
 7. The method of claim 6 wherein the plurality ofbits comprises eleven bits and the plurality of symbols comprises sevensymbols.
 8. The method of claim 2 wherein the plurality of symbolscomprises a plurality of pulse-amplitude modulated (PAM) signals.
 9. Themethod of claim 8 wherein the plurality of symbols comprises a pluralityof PAM-3 signals.
 10. A method of encoding eleven bits into sevensymbols, the method comprising: receiving two bits of the eleven bits;determining whether the two bits can be encoded into one symbol, wherethe two bits defines four states and the one symbol defines threestates; if the two bits can be encoded into one symbol, then encodingthe two bits into the one symbol, and receiving three sets of three bitsin the eleven bits and encoding the three sets of three bits as threesets of two symbols; otherwise if the two bits cannot be encoded intothe one symbol, then receiving a first set of three bits in the threesets of three bits, the first set of three bits having a first value;based on the first value, assigning one of the three sets of two symbolsto have an address value; and encoding the first set of three bits asthe one symbol.
 11. The method of claim 10 further comprising: encodinga second set of three bits in the three sets of three bits as one of thetwo sets of symbols not having the address value; and encoding a thirdset of three bits in the three sets of three bits as one of the two setsof symbols not having the address value and not encoded using the secondset of three bits.
 12. A method of decoding a plurality of symbols intoa plurality of bits, the method comprising: receiving the plurality ofsymbols, where the plurality of symbols includes a first set of symbolsand a number of second sets of symbols; if any of the number of secondsets of symbols has an address value, then, setting a first set of bitsto a first value, where the plurality of bits comprises the first set ofbits and a number of second sets of bits; and if none of the number ofsecond sets of symbols has the address value, then decoding the firstset of symbols as the first set of bits.
 13. The method of claim 12wherein each of the number of second sets of symbols defines a firstnumber of states and a second state, where the second state is used asthe address value.
 14. The method of claim 13 further comprising: if anyof the number of second sets of symbols has the address value, then,based on a symbol value of the first set of symbols and an identity ofthe second set of symbols having the address value, setting a second setof bits in the number of second sets of bits to one of a number ofsecond values.
 15. The method of claim 14 further comprising: if any ofthe number of second sets of symbols has the address value, then,decoding the second sets of symbols not having the address value intosets of bits in the number of second sets of bits.
 16. The method ofclaim 15 further comprising: if none of the number of second sets ofsymbols has the address value, then decoding the number of second setsof symbols into the number of second sets of bits.
 17. The method ofclaim 16 wherein the first set of bits is two bits, the second set ofbits is three bits, the first set of symbols is one symbol, each secondset of symbols is two symbols, the first number of states is eightstates, and the second state is one state.
 18. The method of claim 17wherein the plurality of bits comprises eleven bits and the plurality ofsymbols comprises seven symbols.
 19. The method of claim 13 wherein theplurality of symbols comprises a plurality of pulse-amplitude modulated(PAM) signals.
 20. The method of claim 19 wherein the plurality ofsymbols comprises a plurality of PAM-3 signals.
 21. A method of decodingseven symbols into eleven bits, the method comprising: receiving a firstsymbol and three pairs of symbols; if any of the three pairs of symbolshas an address value, then, setting a first set of two bits to a firstvalue; and if none of the three pairs of symbols has the address value,then decoding the first symbol into the first set of two bits.
 22. Themethod of claim 21 further comprising: if any of the three pairs ofsymbols has the address value, then, based on a symbol value of thefirst symbol and an identity of the pair of symbols having the addressvalue, setting a second set of three bits to one of eight values. 23.The method of claim 22 further comprising: if any of the three pairs ofsymbols has the address value, then, decoding the two pairs of symbolsnot having the address value into two corresponding sets of three bits.24. The method of claim 23 further comprising: if none of the three pairof symbols has the address value, then decoding the three pairs ofsymbols into three corresponding sets of three bits.